package com.web44.springboot.mapper;

import com.web44.springboot.bean.MyUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * @Title: MyUserMapper02
 * @Description:
 * @Auther: py
 * @Version: 1.0
 * @create 2024/3/4 10:23
 */
public interface MyUserMapper02 {

    @Select("SELECT * FROM `user` WHERE id=#{id}")
    MyUser getUserById(Long id);

    @Insert("insert into user(username,real_name,password,gender) values(#{username},#{realName},#{password},#{gender})")
    void addUser(MyUser myUser);
}
